Skip to main content

Create User

POST apps/api/user

Headers:

  • Authorization: Bearer {access_token} — Replace {access_token} with the token obtained from Step 1.
  • Content-Type: application/json
{
"phoneNumber" : "966583944460",
"firstName" : "Name",
"lastName" : "Family",
"nationalId": "2211111122",
"iBAN": "8995422365998855663",
"dateOfBirth": "2000-01-01T10:27:39.889Z",
"callbackUrl": "https://your-callback-url.com"
}

Field Descriptions​

Field NameTypeDescriptionRequired / Notes / Example
phoneNumberstringUser phone numberRequired
firstNamestringUser first nameRequired
lastNamestringUser last nameRequired
nationalIdstringUser national idOptional
iBANstringUser bank account ibanOptional
dateOfBirthdatetimeUser date of birthOptional
callbackUrlstringURL to receive callbacksOptional

Example Request (cURL)​

curl --location 'https://api.wepay.com.sa/apps/api/user' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{
"phoneNumber" : "966583944460",
"firstName" : "Name",
"lastName" : "Family",
"nationalId": "2211111122",
"iBAN": "8995422365998855663",
"dateOfBirth": "2000-01-01T10:27:39.889Z",
"callbackUrl": "https://your-callback-url.com"
}'

Example Response​

{
"data": {
"platformRefId": "USR_123",
"kyc":
{
"url": "https://integration.wepay-sa.com/kyc?isVerified=true&isKycCompleted=false
&isBankAccountReady=true&callbackUrl=https://your-callback-url.com&token=encodedToken",
"token": "encodedToken",
"expiresAt": "2024-06-30T10:27:39.889Z"
}
},
"message": "User created successfully.",
"status": 200,
"validationErrors": []
}

Response Fields:

FieldTypeDescription
platformRefIdstringUnique identifier for the user in the WePay system
kycObjectAn object containing the KYC verification URL and related information

KYC

Field NameTypeDescription
urlstringredirect URL to complete KYC
tokenstringencodedToken
expiresAtdatetimetoken expiration time